package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

@Mapper
public interface UserMapper {
   //根据id查询数据
    @Select("select * from user where openid=#{openid}")
    User getById(String openid);
   //添加数据
    void add(User user);
    //根据用户id查询数据
    @Select("select * from user where id=#{userId}")
    User getByUserId(Long userId);

    /**
     * 获取用户人数
     * @param map
     * @return
     */
    Integer getUSerList(Map map);
}
